<?php

declare(strict_types=1);

namespace app\model;

use app\model\base\BaseAgentMerchantWithdrawItemModel;

/**
 * 
 *
 * @mixin \think\Model
 * @property int $agent_merchant_withdraw_id
 * @property bool $type 类型(1:统计提现,2:提现表id)
 * @property int $relation_id 关联id
 * @property-read \app\model\AgentWithdraw[] $agentWithdraw
 * @property-read \app\model\AgentMerchantStat[] $agentMerchantStat
 * @property-read \app\model\AgentWithdraw $agent_withdraw
 * @property-read \app\model\AgentMerchantStat $agent_merchant_stat
 */
class AgentMerchantWithdrawItem extends BaseAgentMerchantWithdrawItemModel
{
    const TYPE_STAT = 1;
    const TYPE_WITHDRAW = 2;


    public function agentWithdraw(){

        return $this->hasOne(AgentWithdraw::class,'id','relation_id');

    }

    public function agentMerchantStat(){

        return $this->hasOne(AgentMerchantStat::class,'id','relation_id');

    }
}
